package entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
 * This class represent the client connection entity
 * @author Group 9
 *
 */
@Entity
@Table(name="connected_clients")
public class ClientConnectionEntity {
	
	@Id
	private long cid;
	
	private String host;
	
	@Column(name="connection_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date connTime;
	
	@Column(name="user_id")
	private String user;
	
	@Column(name="privilege")
	private String priv;
	
	private boolean loggedin;
	
	@Column(name="login_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date loginTime;

	public long getCid() {
		return cid;
	}

	public void setCid(long cid) {
		this.cid = cid;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Date getConnTime() {
		return connTime;
	}

	public void setConnTime(Date connTime) {
		this.connTime = connTime;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPriv() {
		return priv;
	}

	public void setPriv(String priv) {
		this.priv = priv;
	}

	public boolean isLoggedin() {
		return loggedin;
	}

	public void setLoggedin(boolean loggedin) {
		this.loggedin = loggedin;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}
	
	

}